import {Component} from 'react'
class Demo1 extends Component{
  constructor(){
    super()
    this.state={
      count:20,
      age:18,
      sex:'男'
    }
  }
  render(){
    return(<>
      <h2>01定义状态</h2>
      <p>总数:{this.state.count}</p>
      <p>年龄:{this.state.age}</p>
      <p>性别:{this.state.sex}</p>
    </>)
  }
}
export default Demo1